<%--                                                                       --%>
<%-- Copyright (c) 2004-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ page import =  "java.util.HashMap,
                    org.apache.commons.beanutils.PropertyUtils,
                    org.apache.struts.validator.DynaValidatorForm"
%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<%@ taglib uri="/WEB-INF/struts-html-el.tld" prefix="html-el" %>
<%@ taglib uri="/WEB-INF/struts-bean-el.tld" prefix="bean-el" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

<script language="JavaScript">


<%@ include file="/mc/common/jsutils.jsp" %>

  function doBCAction(theForm, name, property, index) {
    var fieldName = name + '[' + index + '].' + property;
    var field = findField(fieldName);
    theForm.executeSearch.value = 'false';
    theForm.groupFQN.value = field.value;
    theForm.action = '<html-el:rewrite page="/mt/groupMultiPopup.do" />';
    theForm.submit();
    return true;
  }

  function doSearchAction(theForm) {
    theForm.executeSearch.value = 'true';
    theForm.action = '<html-el:rewrite page="/mt/groupPopupSearch.do" />';
    theForm.submit();
    return true;
  }
  
  function doSearchBoxText(theForm)
  {
  	theForm.executeSearch.value = 'true';
    theForm.action = '<html-el:rewrite page="/mt/groupPopupSearch.do" />';
    
    return true;
  
  }

  function doGroupViewActionEx(name, property, index) {
    var fieldName = name + '[' + index + '].' + property;
    var field = findField(fieldName);
    if (field != null) {
      doGroupViewAction(field.value);
    }
  }
  
  function doGroupViewAction(fqn) {
    document.mtGroupPopupForm.groupFQN.value = fqn;
//    document.mtGroupPopupForm.groupName = name;
    document.mtGroupPopupForm.submit();
  }
  
  function doSelect(name, nameProperty, idProperty, index) {
    var fieldNameForID = name + '[' + index + '].' + idProperty;
    var fieldForID = findField(fieldNameForID);
    var fieldNameForName = name + '[' + index + '].' + nameProperty;
    var fieldForName = findField(fieldNameForName);
    if (fieldForName != null) {
      var idsList = new Array();
      var namesList = new Array();
      idsList = idsList.concat(fieldForID.value);
      namesList = namesList.concat(fieldForName.value);
      callParentWindow(idsList, namesList);
    }
  }
  
  function doDoneSingleSelect() {
    var f = document.mtGroupPopupForm;
    var len = f.elements.length;
    var idsList = new Array();
    var namesList = new Array();
    var i = 0;
    for(i = 0; i < len; i++){
      if (f.elements[i].name == "itemIds"){
	if (f.elements[i].type.toLowerCase() == "radio") {
	  if (f.elements[i].checked){
	    idsList = idsList.concat(f.elements[i].value);
	    namesList = namesList.concat(f.elements[i].fqn);
	    break;
	  }
	}
      }
    }
    if (idsList.length < <c:choose><c:when test="${mtGroupPopupForm.map.minSelection != 0}"><c:out value="${1}"/></c:when><c:otherwise><c:out value="${mtGroupPopupForm.map.minSelection}"/></c:otherwise></c:choose>) {
	alert("<bean-el:message key="mt.picker.popup.min.single.selection.required" bundle="mt.messages"/>");
	return;
    }
    callParentWindow(idsList, namesList);
  }
  
  function doDoneMultiSelect() {
    var f = document.mtGroupPopupForm;
    var idsList = new Array();
    var namesList = new Array();
    var ids = f.selectedItemIds.options;
    var names = f.selectedItemNames.options;
    var i = 0;
    for (i = 0; i < ids.length; i++) {
      idsList = idsList.concat(ids[i].value);
      namesList = namesList.concat(names[i].value);
    }
    if (idsList.length < <bean:write name="mtGroupPopupForm" property="minSelection"/>) {
      alert('<bean-el:message key="mt.picker.popup.min.multi.selection.required" arg0="${mtGroupPopupForm.map.minSelection}" bundle="mt.messages"/>');
      return;
     }
     callParentWindow(idsList, namesList);
  }
  
  function findField(fieldName) {
    var elements = document.mtGroupPopupForm.elements;
    var numElements = elements.length;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == fieldName) {
        return elements[elementIndex];
      }
    }
    return null;
  }

  function doAddMultiItems(name, property, ro) {
    var f = document.mtGroupPopupForm;
    var checkboxes = makeItAnArrayIfNot(f.itemIds);
    var i = 0;
    var submitIt = false;
    for (i = 0; i < checkboxes.length; i++) {
      if (checkboxes[i].checked) {
        var fieldName = name + '[' + checkboxes[i].id + '].' + property;
        var field = findField(fieldName);
        if (field != null) {
          var result = doAddOneItemWithoutSubmit(checkboxes[i].value, field.value, ro);
          if (!submitIt) {
            submitIt = result;
          }
        }
      }
    }
    if (submitIt) {
      if (f.executeSearch.value == 'true') {
        f.action = '<c:url value="/mt/groupPopupSearch.do"/>';
      }
      f.submit();
    }
  }
    
  function doAddOneItem(name, nameProperty, idProperty, index, ro) {
    var fieldNameForID = name + '[' + index + '].' + idProperty;
    var fieldForID = findField(fieldNameForID);
    var fieldNameForName = name + '[' + index + '].' + nameProperty;
    var fieldForName = findField(fieldNameForName);
    if (fieldForName != null) {
      if (doAddOneItemWithoutSubmit(fieldForID.value, fieldForName.value, ro)) {
	if (document.mtGroupPopupForm.executeSearch.value == 'true') {
          document.mtGroupPopupForm.action = '<c:url value="/mt/groupPopupSearch.do"/>';
        }
	document.mtGroupPopupForm.submit();
      }
    }
  }
  
  function doAddOneItemWithoutSubmit(id, name, ro) {
    var f = document.mtGroupPopupForm;
    var ids = f.selectedItemIds.options;
    var names = f.selectedItemNames.options;
    var i = 0;
    for (i = 0; i < ids.length; i++) {
      if (document.mtGroupPopupForm.recursiveCheck.value == 'true') {
        if (ids[i].value == id) {
          alert(name + " <bean-el:message key="mt.picker.popup.already.exists" bundle="mt.messages"/>");
          return false;
        }
	else if (ids[i].value.indexOf(id) > -1) {
          alert(name + " <bean-el:message key="mt.group.popup.already.contained" bundle="mt.messages"/>" + names[i].value);
          return false;
        }
	else if (id.indexOf(ids[i].value) > -1) {
          alert(name + " <bean-el:message key="mt.group.popup.already.beingContained" bundle="mt.messages"/>" + names[i].value);
          return false;
        }
        else if (ids[i].value == id) {
          alert(name + " <bean-el:message key="mt.picker.popup.already.exists" bundle="mt.messages"/>");
          return false;
        }
      }
    }
    var newoptionId = new Option(id, id, true, true);
    // special treatment for groups
    var sepIndex = id.indexOf(":");
    name = id.substring(sepIndex + 1);
    var newoptionName = new Option(name, name, true, true);
    var newoptionReadOnly = new Option(ro, ro, true, true);
    f.selectedItemIds.options[f.selectedItemIds.options.length] = newoptionId;
    f.selectedItemNames.options[f.selectedItemNames.options.length] = newoptionName;
    f.selectedItemReadOnlys.options[f.selectedItemReadOnlys.options.length] = newoptionReadOnly;
    return true;
  }
  
  function doDeleteOneItem(index) {
    doDeleteOneItemWithoutSubmit(index);
    if (document.mtGroupPopupForm.executeSearch.value == 'true') {
      document.mtGroupPopupForm.action = '<c:url value="/mt/groupPopupSearch.do"/>';
    }
    document.mtGroupPopupForm.submit();
  }
  
  function doDeleteOneItemWithoutSubmit(index) { 
    if (document.mtGroupPopupForm.selectedItemReadOnlys.options[index].value != '1') {
      document.mtGroupPopupForm.selectedItemIds.options[index].selected = false;
      document.mtGroupPopupForm.selectedItemNames.options[index].selected = false;
      document.mtGroupPopupForm.selectedItemReadOnlys.options[index].selected = false;
    }
  }

  function doDeleteMultiItems() {
    var f = document.mtGroupPopupForm;
    var checkboxes = makeItAnArrayIfNot(f.selectedItems);
    var i = 0;
    for (i = 0; i < checkboxes.length; i++) {
      if (checkboxes[i].checked) {
        doDeleteOneItemWithoutSubmit(i)
      }
    }
    if (f.executeSearch.value == 'true') {
      f.action = '<c:url value="/mt/groupPopupSearch.do"/>';
    }
    f.submit();
  }
  
  // Form will not return an array if there is only one named element exists.
  // so use this function to create an array that contains the single element.
  // If form already returned an array, this function will not create a new array but return the original array
  function makeItAnArrayIfNot(arrayWantToBe) {
    var undefined;
    var returnArray = arrayWantToBe;
    if (returnArray.length == undefined) {
      returnArray = new Array();
      returnArray = returnArray.concat(arrayWantToBe);
    }
    return returnArray;
  }
  

  function callParentWindow(idsList, namesList) {
    self.opener.<bean:write name="mtGroupPopupForm" property="callback"/>(idsList, namesList);
    self.close();
  }

  function setNewGroups(ids, names) {

  }


  function closeWindow() {
    self.close();
  }


</script>

<c:set var="deleteImg">
<img src="<%= request.getContextPath() %>/mc/images/action/icon_remove.gif" width="15" height="15" border="0" class="actionIcon" alt="<bean-el:message key="image.alt.remove" bundle="mt.messages"/>" title="<bean-el:message key="image.alt.remove" bundle="mt.messages"/>">
</c:set>
<c:set var="addImg">
<img src="<%= request.getContextPath() %>/mc/images/action/icon_add.gif" width="15" height="15" border="0" class="actionIcon" alt="<bean-el:message key="image.alt.add" bundle="mt.messages"/>" title="<bean-el:message key="image.alt.add" bundle="mt.messages"/>">
</c:set>
<c:set var="selectImg">
<img src="<%= request.getContextPath() %>/mc/images/action/icon_add.gif" width="15" height="15" border="0" class="actionIcon" alt="<bean-el:message key="image.alt.select" bundle="mt.messages"/>" title="<bean-el:message key="image.alt.select" bundle="mt.messages"/>">
</c:set>

<c:set var="actionPath" value="/mt/groupMultiPopup.do"/>

<c:if test="${mtGroupPopupForm.map.multiSelect}">
  <c:set var="actionPath" value="/mt/groupMultiPopup.do"/>
</c:if>

<html-el:form action="/mt/groupMultiPopup.do">

<html-el:hidden property="parentFormName"/>
<html-el:hidden property="parentFieldName"/>

<html-el:hidden property="callback" />
<html-el:hidden property="groupFQN"/>
<html-el:hidden property="executeSearch"/>
<html-el:hidden property="multiSelect"/>
<html-el:hidden property="minSelection"/>
<html-el:hidden property="recursiveCheck"/>
<html-el:hidden property="orgAdminCheck"/>


<c:if test="${mtGroupPopupForm.map.multiSelect}">
  <html-el:select name="mtGroupPopupForm" property="selectedItemIds" multiple="multiple" style="visibility: hidden; display: none;">
    <html-el:options name="mtGroupPopupForm" property="selectedItemIds"/>
  </html-el:select>
  <html-el:select name="mtGroupPopupForm" property="selectedItemNames" multiple="multiple" style="visibility: hidden; display: none;">
    <html-el:options name="mtGroupPopupForm" property="selectedItemNames"/>
  </html-el:select>
  <html-el:select name="mtGroupPopupForm" property="selectedItemReadOnlys" multiple="multiple" style="visibility: hidden; display: none;">
    <html-el:options name="mtGroupPopupForm" property="selectedItemReadOnlys"/>
  </html-el:select>
</c:if>


<!-- Zone 5 starts here.  -->
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
    <td valign="top" width="100%">
      <div class="pageTitle">
        <c:choose>
          <c:when test="${mtGroupPopupForm.map.multiSelect}">
            <bean-el:message key="mt.group.popup.multiple.pageTitle" bundle="mt.messages"/>
          </c:when>
          <c:otherwise>
            <bean-el:message key="mt.group.popup.pageTitle" bundle="mt.messages"/>
          </c:otherwise>
        </c:choose>
      </div>
            <div class="generalWrapRight">
              <html-el:button property="closeWinBtn" styleClass="inputButton" onclick="javascript:closeWindow()">
                <bean-el:message key="button.close" bundle="mc.messages"/>
              </html-el:button>
            </div> 

            <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="2" summary="Group search criteria table">
              <tr> 
                <td width="10%" nowrap>
                  <b><bean-el:message key="mt.group.groupFind.label.searchGroup" bundle="mt.messages"/>:</b><br>&nbsp;
                </td>
                <td width="10%" nowrap>
                  <html-el:text property="groupName" size="20" onkeypress="javascript: doSearchBoxText(document.mtGroupPopupForm);" maxlength="80" />
                </td>
                <td width="60%" nowrap>
                  <html-el:submit property="gotoBtn" styleClass="inputButton" onclick="javascript: doSearchAction(document.mtGroupPopupForm);">
                    <bean-el:message key="button.goto" bundle="mc.messages"/>
                  </html-el:submit>
                </td>
              </tr>
            </table>
			

        <div class="breadcrumb">
          
          <c:if test="${!mtGroupPopupForm.map.executeSearch}">
            <c:if test="${not empty mtGroupPopupView.map.breadcrumbs}">
              <c:if test="${mtGroupPopupForm.map.groupFQN != 'root'}">
                <c:forEach var="oneBC" items="${mtGroupPopupView.map.breadcrumbs}" varStatus="status">
                  <c:choose>
                    <c:when test="${not empty oneBC.map.fqn}">
                      <html-el:hidden name="oneBC" property="fqn" indexed='true'/>
                      <a href="#" onclick="javascript: doBCAction(document.mtGroupPopupForm, 'oneBC', 'fqn',
                        '<c:out value="${status.count - 1}"/>');" ><c:out value="${oneBC.map.name}"/></a>
                    </c:when>
                    <c:otherwise>
                      <c:out value="${oneBC.map.name}"/>
                    </c:otherwise>
                  </c:choose>
                  <c:if test="${not empty oneBC.map.name}">
                  &nbsp;<bean-el:message key="mt.breadcrumb.separator" bundle="mt.messages"/>
                   </c:if>
                </c:forEach>
              </c:if>
            </c:if>
            <c:out value="${mtGroupPopupView.map.groupName}" />
          </c:if>

          <c:if test="${mtGroupPopupForm.map.executeSearch}">
            <c:if test="${not empty mtGroupPopupView.map.breadcrumbs}">
              <c:forEach var="oneBC" items="${mtGroupPopupView.map.breadcrumbs}" varStatus="status">
                <c:choose>
                  <c:when test="${not empty oneBC.map.fqn}">
                    <html-el:hidden name="oneBC" property="fqn" indexed='true'/>
                    <a href="#" onclick="javascript: doBCAction(document.mtGroupPopupForm, 'oneBC', 'fqn',
                      '<c:out value="${status.count - 1}"/>');" ><c:out value="${oneBC.map.name}"/></a>
                  </c:when>
                  <c:otherwise>
                    <c:out value="${oneBC.map.name}"/>
                  </c:otherwise>
                </c:choose>
              </c:forEach>
            </c:if>
          </c:if>
        </div>


        <div class="pageSubtitle">
          <span class="left">
            <bean-el:message key="mt.group.groups" bundle="mt.messages"/>&nbsp;
          </span>
          <span class="right">
            &nbsp;
          </span>
        </div>
      
        <c:if test="${mtGroupPopupForm.map.multiSelect}">
          <div class="globalButtonWrap">
            <input type="button" name="actionMarkAll" class="globalButton" onclick="check(this.form.itemIds, this, '<bean-el:message key="button.markAll" bundle="mt.messages"/>', '<bean:message key="button.unmarkAll" bundle="mt.messages"/>');"
	          	value="<bean-el:message key="mt.picker.popup.mark.all" bundle="mt.messages"/>">
            <input type="button" name="actionAddToSelect" class="globalButton" onclick="doAddMultiItems('oneGroup', 'name', '0');"
				value="<bean:message key="mt.picker.popup.add.to.selected.items" bundle="mt.messages"/>">
          </div>
        </c:if>

      <!--start main content area here-->

      <table class="dataTable" border="0" cellspacing="1" cellpadding="2" summary="Category" width="100%">
        <tr class="listHeader"> 
          <c:if test="${mtGroupPopupForm.map.multiSelect}">
            <th id="Checkboxes" align="center" width="5%"></th>
          </c:if>
          <th id="SubCategoryName" align="left" width="40%">
            <bean-el:message key="mt.group.label.groupName" bundle="mt.messages"/>
          </th>
            <th id="Actions" align="left"  width="15%" nowrap>
              <bean-el:message key="mt.header.actions" bundle="mt.messages"/>
            </th>
        </tr>
      
        <c:choose>
          <c:when test="${not empty mtGroupPopupView.map.groupList}">
            <c:forEach var="oneGroup" items="${mtGroupPopupView.map.groupList}" varStatus="status">
	      <html-el:hidden name="oneGroup" property="name" indexed='true'/>
	      <html-el:hidden name="oneGroup" property="fqn" indexed='true'/>
              <c:choose>
                <c:when test="${(status.count + 1) % 2 == 0}">
                  <tr class="listEven">
                </c:when> 
  	        <c:otherwise>
                  <tr class="listOdd">
	        </c:otherwise>
              </c:choose>

              <c:if test="${mtGroupPopupForm.map.multiSelect}">
                <td headers="Checkboxes" align="center">
                  <input type="checkbox" name="itemIds" value='<c:out value="${oneGroup.map.fqn}"/>' onclick="update(this.form.itemIds, this.form.actionMarkAll, '<bean-el:message key="button.markAll" bundle="mt.messages"/>', '<bean-el:message key="button.unmarkAll" bundle="mt.messages"/>');" id='<c:out value="${status.count - 1}"/>'/>
                </td>
             </c:if>

          <td headers="SubCategoryName" align="left" width="40%">
             <a href='#' onclick="doGroupViewActionEx('oneGroup', 'fqn', '<c:out value="${status.count - 1}"/>');">
               <c:out value="${oneGroup.map.name}"/></a>
            &nbsp;
          </td>
            <td nowrap align="left" headers="Actions">
              <c:if test="${mtGroupPopupForm.map.multiSelect}">
                <a href='#' onclick="doAddOneItem('oneGroup', 'name', 'fqn', <c:out value="${status.count - 1}"/>, '0');">
                  <c:out value='${addImg}' escapeXml="false"/></a>
              </c:if>
              <c:if test="${!mtGroupPopupForm.map.multiSelect}">
                <a href='#' onclick="doSelect('oneGroup', 'name', 'fqn', '<c:out value="${status.count - 1}"/>');">
                  <c:out value='${selectImg}' escapeXml="false"/></a>
              </c:if>
            </td>

        </tr>
        
            </c:forEach>
          </c:when>
          <c:otherwise>
              <tr class="listOdd">
                <td colspan=7 align="center">
                  <bean-el:message key="mt.group.noGroup" bundle="mt.messages"/>
                </td>
              </tr>
          </c:otherwise>
        </c:choose>
      </table>


      <%-- multiple selection section --%>

      <c:if test="${mtGroupPopupForm.map.multiSelect}"> 
        <div class="pageSubtitle" width="20%">
          <span class="left">
            <bean-el:size id="count" name="mtGroupPopupForm" property="selectedItemIds"/>
              <bean-el:message key="mt.picker.popup.selected.items" arg0="${count}" bundle="mt.messages"/>        
          </span>
	  <div class="right" width="80%">
          </div>
        </div>

        <%-- These global buttons are for multiple selection and will only show up when the "Selected items list is not empty --%>
        <c:if test="${not empty mtGroupPopupForm.map.selectedItemIds}">
          <div class="globalButtonWrap">
	    <input type="button" name="actionSelectAll" class="globalButton" onclick="check(this.form.selectedItems, this);" value="<bean-el:message key="button.selectAll" bundle="mt.messages"/>">
            <input type="button" name="actionRemove" class="globalButton" onclick="doDeleteMultiItems();" value="<bean-el:message key="button.remove" bundle="mt.messages"/>">
          </div>
	</c:if>
        <%-- End --%>

        <%-- This section is for "Selected items" list --%>
	<table class="dataTable" border="0" cellspacing="1" cellpadding="2" summary="Search result table" width="100%">
          <tr class="listHeader">
            <th id="ChkBtns">&nbsp;</th>
            <th id="Name" align="left">
               <bean-el:message key="mt.picker.popup.name" bundle="mt.messages"/>
            </th>
            <th id="Actions" align="left" nowrap>
               <bean-el:message key="mt.header.actions" bundle="mt.messages"/>
            </th>
           </tr>
           <c:choose>
             <c:when test="${not empty mtGroupPopupForm.map.selectedItemIds}">
               <bean:define id="itemNames" name="mtGroupPopupForm" property="selectedItemNames" type="java.lang.String[]"/>
               <bean:define id="itemReadOnlys" name="mtGroupPopupForm" property="selectedItemReadOnlys" type="java.lang.Integer[]"/>
               <% int i = 0; %>
               <c:forEach var="item" items="${mtGroupPopupForm.map.selectedItemIds}" varStatus="status">
                 <c:choose>
                   <c:when test="${(status.count + 1) % 2 == 0}">
                     <tr class="listEven">
                   </c:when> 
                   <c:otherwise>
                     <tr class="listOdd">
                   </c:otherwise>
                 </c:choose>
                 <td headers="ChkBtns" align="center">
                   <% if (0 == itemReadOnlys[i].intValue()) { %>
                     <input type="checkbox" name="selectedItems" value='<c:out value="${item}"/>' onclick="update(this.form.selectedItems, this.form.actionSelectAll);" id='<%=itemNames[i]%>'/>
                   <% } %>
                 </td>
                 <td headers="Name"><%=itemNames[i]%></td>
                 <td headers="Actions">
                   <% if (0 == itemReadOnlys[i].intValue()) { %>
                     <a href='#' onclick="doDeleteOneItem(<c:out value="${status.count - 1}"/>);">
                       <c:out value='${deleteImg}' escapeXml="false"/></a>
                   <% } %>
                 </td>
               </tr>
               <%i++;%>
               </c:forEach>
             </c:when>
             <c:otherwise>
              <tr class="listOdd">
                <td align="center" colspan="6">
                  <bean-el:message key="mt.group.group.noFound" bundle="mt.messages"/>
                </td>
              </tr>
             </c:otherwise>
           </c:choose>
        </table>
        <%-- End multiple selection section--%>
      </c:if>

      <%-- Bottom section --%>
    <c:if test="${mtGroupPopupForm.map.multiSelect}">
      <div class="pageButtonWrap" align="right">
        <input type="button" name="actionCancel" class="pageButton" onclick="closeWindow();" value='<bean:message key="button.cancel" bundle="mt.messages"/>'>
        <c:if test="${mtGroupPopupForm.map.multiSelect}">
          <input type="button" name="actionDone" class="pageButton" onclick="doDoneMultiSelect();" value='<bean-el:message key="button.update" bundle="mt.messages"/>'>
        </c:if>
        <c:if test="${!mtGroupPopupForm.map.multiSelect}">
          <input type="button" name="actionDone" class="pageButton" onclick="doDoneSingleSelect();" value='<bean-el:message key="button.select" bundle="mt.messages"/>'>
        </c:if>
      </div>
    </c:if>
      <%-- End --%>

   </td>
  </tr>
</table>
<!--end zone 5 content here -->

</html-el:form>
